import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('ParticleRotate')
export class ParticleRotate extends Component
{

    public rotate:boolean=true;
    public rotZ:number=0;
    public static readonly rotateSpeed:number=360;

    update(deltaTime: number)
    {
        if(this.rotate===false)
            return;
        this.rotZ+=deltaTime * ParticleRotate.rotateSpeed;
        this.node.setRotationFromEuler(0,0,this.rotZ);
    }

}

